import Layout from '@/layout'

const modulesFiles = require.context('./', true, /router\.js$/)

const routerModules = modulesFiles.keys().reduce((modules, modulePath) => {
    const value = modulesFiles(modulePath)
    if (value.default) modules.push(...value.default)
    return modules
}, [])

const teachingCenterRouter = [{
        path: '/teachingCenter',
        name: 'teachingCenter',
        component: Layout,
        meta: { title: '教学中心', icon: 'studentManage' },
        hidden: true
    },
    ...routerModules
]
export default teachingCenterRouter